package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;

import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputPattern;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.en.TransType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;

/**
 * 红包使用日志
 * 
 * @author weiyuan
 *
 */
@Entity
public class RedPacketPayLog extends AbstractAssign18IdEntity {

    /**
	 * 
	 */
    private static final long serialVersionUID = 8204568497675617956L;

    /**
     * 红包ID
     */
    @HtmlInput(label = "红包ID", type = HtmlInputType.TEXT, index = 3)
    private Long redPacketId;
    /**
     * 交易金额，单位：分
     */
    @HtmlInput(label = "交易金额 ", type = HtmlInputType.TEXT, index = 4, pattern = HtmlInputPattern.INT)
    private Long money;

    /**
     * 交易后金额，单位：分
     */
    @HtmlInput(label = "交易后金额 ", type = HtmlInputType.TEXT, index = 5, pattern = HtmlInputPattern.INT)
    private Long remnantMoney;

    /**
     * 交易类型
     */
    @HtmlInput(label = "交易类型", type = HtmlInputType.SELECT, index = 5, nullable = false, labelProperty = "text")
    @Column(length = 20)
    @Enumerated(javax.persistence.EnumType.STRING)
    private TransType transType;

    /**
     * 引用交易的外部流水号
     */
    @Column(length = 50)
    @HtmlInput(label = "引用ID", type = HtmlInputType.TEXT, index = 7, nullable = true, labelProperty = "text")
    private String referenceId;

    /**
     * 交易时间
     */
    @HtmlInput(label = "交易时间 ", type = HtmlInputType.TEXT, index = 8, pattern = HtmlInputPattern.DATETIME, format = "yy-MM-dd HH:mm")
    private Date transTime;

    /**
     * 更新时间
     */
    @HtmlInput(label = "最后修改日期", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true, index = 14)
    private Date updateTime;

    /**
     * 创建时间
     */
    @HtmlInput(label = "创建时间", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true, index = 15)
    private Date createTime;

    public Long getRedPacketId() {
        return redPacketId;
    }

    public void setRedPacketId(Long redPacketId) {
        this.redPacketId = redPacketId;
    }

    public Long getMoney() {
        return money;
    }

    public void setMoney(Long money) {
        this.money = money;
    }

    public Long getRemnantMoney() {
        return remnantMoney;
    }

    public void setRemnantMoney(Long remnantMoney) {
        this.remnantMoney = remnantMoney;
    }

    public TransType getTransType() {
        return transType;
    }

    public void setTransType(TransType transType) {
        this.transType = transType;
    }

    public String getReferenceId() {
        return referenceId;
    }

    public void setReferenceId(String referenceId) {
        this.referenceId = referenceId;
    }

    public Date getTransTime() {
        return transTime;
    }

    public void setTransTime(Date transTime) {
        this.transTime = transTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

}
